package cn.znzz.cjm.org.service.impl;

import cn.znzz.cjm.basic.service.impl.BaseServiceImpl;
import cn.znzz.cjm.org.domain.Dictionarytype;
import cn.znzz.cjm.org.mapper.DictionarydetailMapper;
import cn.znzz.cjm.org.mapper.DictionarytypeMapper;
import cn.znzz.cjm.org.service.IDictionarytypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
 * 部门业务层实现
 */
@Service
public class DictionarytypeServiceImpl extends BaseServiceImpl<Dictionarytype> implements IDictionarytypeService {

    @Autowired
    private DictionarytypeMapper dictionarytypeMapper;

    //重写删除方法
    @Override
    @Transactional
    public void remove(Long id) {
        try {
            dictionarytypeMapper.remove(id);//删除子表


            dictionarytypeMapper.delete(id);//删除本表
        }catch (Exception e){
            e.printStackTrace();
        }

    }
}
